//Develop a class which implements SQLData interface
import java.sql.*;

  class Address implements SQLData 
  {
	private int hno;
	private String street;
	private String city;
	private String state;
	private String typeName;
	
	void setAddress(int hno, String street, String city, String state)
	{
		this.hno=hno;
		this.street=street;
		this.city=city;
		this.state=state;
	}
	public void writeSQL(SQLOutput stream) throws SQLException
	{
		stream.writeInt(hno);
		stream.writeString(street);
		stream.writeString(city);
		stream.writeString(state);
	}
	public void readSQL(SQLInput Stream, String typeName) throws SQLException
	{
		hno=Stream.readInt();
		street=Stream.readString();
		city=Stream.readString();
		state=Stream.readString();
		this.typeName=getSQLTypeName();
	}
	
	public String getSQLTypeName()
	{
		return "ADDTYPE";
		
	}

  }
